<template>
  <div class="tree-select-box1">
    <van-tree-select height="100%" :items="items" :main-active-index.sync="active">
      <template #content>
        <van-image
          v-if="active === 0"
          src="https://img01.yzcdn.cn/vant/apple-1.jpg"
        />
        <van-image
          v-if="active === 1"
          src="https://img01.yzcdn.cn/vant/apple-2.jpg"
        />
        <div v-if="active === 2">
          123
        </div>
      </template>
    </van-tree-select>
  </div>
</template>

<script>
export default {
 data() {
    return {
      active: 0,
      items: [{ text: '分组 1' }, { text: '分组 2' }, { text: '分组 2' }, { text: '分组 2' }, { text: '分组 2' }, { text: '分组 2' }],
    };
  },
}
</script>

<style lang="scss">
  .tree-select-box1 {
    .van-tree-select {
      position: relative;
    }
    .van-tree-select__content {
      height: 100vh;
    }
  }
</style>